home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 15 / develop Issue 15 code / Floating Windows.sea / Floating Windows / Floating Windows Code / Shell Code / menuDispatch.c < prev    next >
MacBinary  |  1995-07-18  |  5.1 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Jul 18 11:07:23 1995, modified Tue Jul 18 11:07:23 1995, creator 'MMCC', type ASCII, 4577 bytes "menuDispatch.c" , at 0x1261 456 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 6d 65 6e 75 44 69 | 73 70 61 74 63 68 2e 63 |..menuDi|spatch.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 11 e1 00 | 00 01 c8 ac 31 7e ab ac |........|....1~..|
|00000060| 31 7e ab 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |1~......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 13 96 00 00 |........|........|
|00000080| 2f 2f 20 49 66 20 74 68 | 65 20 69 6e 74 65 72 66 |// If th|e interf|
|00000090| 61 63 65 73 20 61 72 65 | 6e 27 74 20 69 6e 63 6c |aces are|n't incl|
|000000a0| 75 64 65 64 20 79 65 74 | 2c 20 64 6f 20 74 68 65 |uded yet|, do the|
|000000b0| 20 73 74 61 6e 64 61 72 | 64 20 69 6e 63 6c 75 64 | standar|d includ|
|000000c0| 65 73 2e 20 4f 74 68 65 | 72 77 69 73 65 2c 20 70 |es. Othe|rwise, p|
|000000d0| 72 65 63 6f 6d 70 69 6c | 65 64 20 68 65 61 64 65 |recompil|ed heade|
|000000e0| 72 73 0d 2f 2f 20 68 61 | 76 65 20 62 65 65 6e 20 |rs.// ha|ve been |
|000000f0| 6c 6f 61 64 65 64 20 61 | 6c 72 65 61 64 79 2c 20 |loaded a|lready, |
|00000100| 74 68 61 6e 6b 20 79 6f | 75 20 76 65 72 79 20 6d |thank yo|u very m|
|00000110| 75 63 68 0d 23 69 66 6e | 64 65 66 20 5f 5f 54 59 |uch.#ifn|def __TY|
|00000120| 50 45 53 5f 5f 0d 09 23 | 69 6e 63 6c 75 64 65 20 |PES__..#|include |
|00000130| 3c 54 79 70 65 73 2e 68 | 3e 0d 09 23 69 6e 63 6c |<Types.h|>..#incl|
|00000140| 75 64 65 20 3c 41 70 70 | 6c 65 45 76 65 6e 74 73 |ude <App|leEvents|
|00000150| 2e 68 3e 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 44 |.h>..#in|clude <D|
|00000160| 65 73 6b 2e 68 3e 0d 09 | 23 69 6e 63 6c 75 64 65 |esk.h>..|#include|
|00000170| 20 3c 44 69 61 6c 6f 67 | 73 2e 68 3e 0d 09 23 69 | <Dialog|s.h>..#i|
|00000180| 6e 63 6c 75 64 65 20 3c | 45 64 69 74 69 6f 6e 73 |nclude <|Editions|
|00000190| 2e 68 3e 0d 09 23 69 6e | 63 6c 75 64 65 20 3c 45 |.h>..#in|clude <E|
|000001a0| 76 65 6e 74 73 2e 68 3e | 0d 09 23 69 6e 63 6c 75 |vents.h>|..#inclu|
|000001b0| 64 65 20 3c 4d 65 6e 75 | 73 2e 68 3e 0d 09 23 69 |de <Menu|s.h>..#i|
|000001c0| 6e 63 6c 75 64 65 20 3c | 53 65 67 4c 6f 61 64 2e |nclude <|SegLoad.|
|000001d0| 68 3e 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 54 65 |h>..#inc|lude <Te|
|000001e0| 78 74 55 74 69 6c 73 2e | 68 3e 0d 09 23 69 6e 63 |xtUtils.|h>..#inc|
|000001f0| 6c 75 64 65 20 3c 54 6f | 6f 6c 55 74 69 6c 73 2e |lude <To|olUtils.|
|00000200| 68 3e 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 57 69 |h>..#inc|lude <Wi|
|00000210| 6e 64 6f 77 73 2e 68 3e | 0d 23 65 6e 64 69 66 0d |ndows.h>|.#endif.|
|00000220| 0d 23 69 6e 63 6c 75 64 | 65 20 22 65 76 65 6e 74 |.#includ|e "event|
|00000230| 48 61 6e 64 6c 65 72 2e | 68 22 0d 23 69 6e 63 6c |Handler.|h".#incl|
|00000240| 75 64 65 20 22 66 69 6c | 65 4d 65 6e 75 52 6f 75 |ude "fil|eMenuRou|
|00000250| 74 69 6e 65 73 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |tines.h"|.#includ|
|00000260| 65 20 22 6d 65 6e 75 44 | 69 73 70 61 74 63 68 2e |e "menuD|ispatch.|
|00000270| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 57 69 6e |h".#incl|ude "Win|
|00000280| 64 6f 77 45 78 74 65 6e | 73 69 6f 6e 73 2e 68 22 |dowExten|sions.h"|
|00000290| 0d 0d 2f 2a 20 47 6c 6f | 62 61 6c 73 20 2a 2f 0d |../* Glo|bals */.|
|000002a0| 09 0d 65 78 74 65 72 6e | 20 42 6f 6f 6c 65 61 6e |..extern| Boolean|
|000002b0| 09 09 09 09 67 44 6f 6e | 65 3b 09 09 09 09 09 09 |....gDon|e;......|
|000002c0| 2f 2f 20 53 65 74 20 74 | 6f 20 74 72 75 65 20 69 |// Set t|o true i|
|000002d0| 66 20 75 73 65 72 20 73 | 65 6c 65 63 74 73 20 51 |f user s|elects Q|
|000002e0| 75 69 74 0d 65 78 74 65 | 72 6e 20 57 69 6e 64 6f |uit.exte|rn Windo|
|000002f0| 77 52 65 66 09 09 09 67 | 52 65 63 6f 72 64 69 6e |wRef...g|Recordin|
|00000300| 67 46 6c 6f 61 74 65 72 | 3b 09 09 09 2f 2f 20 52 |gFloater|;...// R|
|00000310| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 72 65 63 6f |eference| to reco|
|00000320| 72 64 69 6e 67 20 66 6c | 6f 61 74 69 6e 67 20 77 |rding fl|oating w|
|00000330| 69 6e 64 6f 77 0d 65 78 | 74 65 72 6e 20 57 69 6e |indow.ex|tern Win|
|00000340| 64 6f 77 52 65 66 09 09 | 09 67 54 6f 6f 6c 73 46 |dowRef..|.gToolsF|
|00000350| 6c 6f 61 74 65 72 3b 09 | 09 09 09 2f 2f 20 52 65 |loater;.|...// Re|
|00000360| 66 65 72 65 6e 63 65 20 | 74 6f 20 74 6f 6f 6c 73 |ference |to tools|
|00000370| 20 66 6c 6f 61 74 69 6e | 67 20 77 69 6e 64 6f 77 | floatin|g window|
|00000380| 0d 65 78 74 65 72 6e 20 | 41 63 74 69 76 61 74 65 |.extern |Activate|
|00000390| 48 61 6e 64 6c 65 72 55 | 50 50 09 67 41 63 74 69 |HandlerU|PP.gActi|
|000003a0| 76 61 74 65 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |vateEven|tHandler|
|000003b0| 3b 0d 0d 2f 2f 20 61 20 | 74 65 73 74 20 72 6f 75 |;..// a |test rou|
|000003c0| 74 69 6e 65 0d 76 6f 69 | 64 20 54 65 73 74 4d 61 |tine.voi|d TestMa|
|000003d0| 6e 75 61 6c 4d 6f 64 61 | 6c 28 76 6f 69 64 29 3b |nualModa|l(void);|
|000003e0| 0d 0d 0d 76 6f 69 64 20 | 44 6f 4d 65 6e 75 43 6f |...void |DoMenuCo|
|000003f0| 6d 6d 61 6e 64 28 6c 6f | 6e 67 20 6d 65 6e 75 43 |mmand(lo|ng menuC|
|00000400| 68 6f 69 63 65 29 0d 7b | 0d 09 6c 6f 6e 67 09 6d |hoice).{|..long.m|
|00000410| 65 6e 75 49 44 3b 0d 09 | 6c 6f 6e 67 09 6d 65 6e |enuID;..|long.men|
|00000420| 75 49 74 65 6d 3b 0d 09 | 73 68 6f 72 74 09 64 61 |uItem;..|short.da|
|00000430| 52 65 66 3b 0d 09 53 74 | 72 32 35 35 09 64 61 4e |Ref;..St|r255.daN|
|00000440| 61 6d 65 3b 0d 09 42 6f | 6f 6c 65 61 6e 09 65 64 |ame;..Bo|olean.ed|
|00000450| 69 74 52 65 73 75 6c 74 | 3b 0d 09 0d 09 6d 65 6e |itResult|;....men|
|00000460| 75 49 44 20 3d 20 28 6d | 65 6e 75 43 68 6f 69 63 |uID = (m|enuChoic|
|00000470| 65 20 26 20 30 78 46 46 | 46 46 30 30 30 30 29 20 |e & 0xFF|FF0000) |
|00000480| 3e 3e 20 31 36 3b 0d 09 | 6d 65 6e 75 49 74 65 6d |>> 16;..|menuItem|
|00000490| 20 3d 20 6d 65 6e 75 43 | 68 6f 69 63 65 20 26 20 | = menuC|hoice & |
|000004a0| 30 78 30 30 30 30 46 46 | 46 46 3b 0d 09 0d 09 73 |0x0000FF|FF;....s|
|000004b0| 77 69 74 63 68 20 28 6d | 65 6e 75 49 44 29 20 7b |witch (m|enuID) {|
|000004c0| 0d 09 09 63 61 73 65 20 | 72 41 70 70 6c 65 4d 65 |...case |rAppleMe|
|000004d0| 6e 75 49 44 3a 09 09 69 | 66 20 28 6d 65 6e 75 49 |nuID:..i|f (menuI|
|000004e0| 74 65 6d 20 3d 3d 20 6b | 41 62 6f 75 74 49 74 65 |tem == k|AboutIte|
|000004f0| 6d 29 0d 09 09 09 09 09 | 09 09 09 09 44 6f 41 62 |m)......|....DoAb|
|00000500| 6f 75 74 28 29 3b 0d 09 | 09 09 09 09 09 09 09 65 |out();..|.......e|
|00000510| 6c 73 65 20 7b 0d 09 09 | 09 09 09 09 09 09 09 47 |lse {...|.......G|
|00000520| 65 74 49 74 65 6d 28 47 | 65 74 4d 48 61 6e 64 6c |etItem(G|etMHandl|
|00000530| 65 28 72 41 70 70 6c 65 | 4d 65 6e 75 49 44 29 2c |e(rApple|MenuID),|
|00000540| 20 28 73 68 6f 72 74 29 | 20 6d 65 6e 75 49 74 65 | (short)| menuIte|
|00000550| 6d 2c 20 64 61 4e 61 6d | 65 29 3b 0d 09 09 09 09 |m, daNam|e);.....|
|00000560| 09 09 09 09 09 64 61 52 | 65 66 20 3d 20 4f 70 65 |.....daR|ef = Ope|
|00000570| 6e 44 65 73 6b 41 63 63 | 28 64 61 4e 61 6d 65 29 |nDeskAcc|(daName)|
|00000580| 3b 0d 09 09 09 09 09 09 | 09 09 7d 0d 09 09 09 09 |;.......|..}.....|
|00000590| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|000005a0| 65 20 72 46 69 6c 65 4d | 65 6e 75 49 44 3a 09 09 |e rFileM|enuID:..|
|000005b0| 48 61 6e 64 6c 65 46 69 | 6c 65 4d 65 6e 75 49 74 |HandleFi|leMenuIt|
|000005c0| 65 6d 73 28 28 73 68 6f | 72 74 29 20 6d 65 6e 75 |ems((sho|rt) menu|
|000005d0| 49 74 65 6d 29 3b 0d 09 | 09 09 09 09 09 09 09 62 |Item);..|.......b|
|000005e0| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 72 45 64 |reak;...|case rEd|
|000005f0| 69 74 4d 65 6e 75 49 44 | 3a 09 09 65 64 69 74 52 |itMenuID|:..editR|
|00000600| 65 73 75 6c 74 20 3d 20 | 53 79 73 74 65 6d 45 64 |esult = |SystemEd|
|00000610| 69 74 28 28 73 68 6f 72 | 74 29 20 28 6d 65 6e 75 |it((shor|t) (menu|
|00000620| 49 74 65 6d 20 2d 20 31 | 29 29 3b 0d 09 09 09 09 |Item - 1|));.....|
|00000630| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00000640| 65 20 72 46 6c 6f 61 74 | 65 72 73 4d 65 6e 75 49 |e rFloat|ersMenuI|
|00000650| 44 3a 09 48 61 6e 64 6c | 65 72 46 6c 6f 61 74 65 |D:.Handl|erFloate|
|00000660| 72 4d 65 6e 75 49 74 65 | 6d 73 28 28 73 68 6f 72 |rMenuIte|ms((shor|
|00000670| 74 29 20 6d 65 6e 75 49 | 74 65 6d 29 3b 0d 09 09 |t) menuI|tem);...|
|00000680| 09 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 0d |......br|eak;....|
|00000690| 09 09 2f 2f 20 66 6f 72 | 20 74 65 73 74 69 6e 67 |..// for| testing|
|000006a0| 2e 2e 2e 0d 09 09 63 61 | 73 65 20 31 33 32 3a 09 |......ca|se 132:.|
|000006b0| 09 09 09 54 65 73 74 4d | 61 6e 75 61 6c 4d 6f 64 |...TestM|anualMod|
|000006c0| 61 6c 28 29 3b 0d 09 09 | 09 09 09 09 09 09 62 72 |al();...|......br|
|000006d0| 65 61 6b 3b 0d 09 7d 0d | 09 48 69 6c 69 74 65 4d |eak;..}.|.HiliteM|
|000006e0| 65 6e 75 28 30 29 3b 0d | 7d 0d 0d 76 6f 69 64 20 |enu(0);.|}..void |
|000006f0| 44 6f 41 62 6f 75 74 28 | 29 0d 7b 0d 09 73 68 6f |DoAbout(|).{..sho|
|00000700| 72 74 09 61 6c 65 72 74 | 52 65 73 75 6c 74 3b 0d |rt.alert|Result;.|
|00000710| 09 0d 09 44 65 61 63 74 | 69 76 61 74 65 46 6c 6f |...Deact|ivateFlo|
|00000720| 61 74 65 72 73 41 6e 64 | 46 69 72 73 74 44 6f 63 |atersAnd|FirstDoc|
|00000730| 75 6d 65 6e 74 57 69 6e | 64 6f 77 28 29 3b 0d 09 |umentWin|dow();..|
|00000740| 61 6c 65 72 74 52 65 73 | 75 6c 74 20 3d 20 41 6c |alertRes|ult = Al|
|00000750| 65 72 74 28 32 35 36 2c | 20 6e 69 6c 29 3b 0d 09 |ert(256,| nil);..|
|00000760| 41 63 74 69 76 61 74 65 | 46 6c 6f 61 74 65 72 73 |Activate|Floaters|
|00000770| 41 6e 64 46 69 72 73 74 | 44 6f 63 75 6d 65 6e 74 |AndFirst|Document|
|00000780| 57 69 6e 64 6f 77 28 29 | 3b 0d 7d 0d 0d 76 6f 69 |Window()|;.}..voi|
|00000790| 64 20 48 61 6e 64 6c 65 | 46 69 6c 65 4d 65 6e 75 |d Handle|FileMenu|
|000007a0| 49 74 65 6d 73 28 73 68 | 6f 72 74 20 74 68 65 49 |Items(sh|ort theI|
|000007b0| 74 65 6d 29 0d 7b 0d 09 | 73 77 69 74 63 68 20 28 |tem).{..|switch (|
|000007c0| 74 68 65 49 74 65 6d 29 | 20 7b 0d 09 09 63 61 73 |theItem)| {...cas|
|000007d0| 65 20 6b 4e 65 77 49 74 | 65 6d 3a 09 09 43 72 65 |e kNewIt|em:..Cre|
|000007e0| 61 74 65 4e 65 77 44 6f | 63 75 6d 65 6e 74 57 69 |ateNewDo|cumentWi|
|000007f0| 6e 64 6f 77 28 29 3b 0d | 09 09 09 09 09 09 09 62 |ndow();.|.......b|
|00000800| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 6b 4f 70 |reak;...|case kOp|
|00000810| 65 6e 49 74 65 6d 3a 09 | 09 47 65 74 46 69 6c 65 |enItem:.|.GetFile|
|00000820| 54 6f 4f 70 65 6e 28 29 | 3b 0d 09 09 09 09 09 09 |ToOpen()|;.......|
|00000830| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 6b |.break;.|..case k|
|00000840| 43 6c 6f 73 65 49 74 65 | 6d 3a 09 43 6c 6f 73 65 |CloseIte|m:.Close|
|00000850| 46 69 72 73 74 44 6f 63 | 75 6d 65 6e 74 57 69 6e |FirstDoc|umentWin|
|00000860| 64 6f 77 28 29 3b 0d 09 | 09 09 09 09 09 09 62 72 |dow();..|......br|
|00000870| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 6b 46 69 6e |eak;...c|ase kFin|
|00000880| 64 49 74 65 6d 3a 09 09 | 53 68 6f 77 46 69 6e 64 |dItem:..|ShowFind|
|00000890| 44 69 61 6c 6f 67 28 29 | 3b 0d 09 09 09 09 09 09 |Dialog()|;.......|
|000008a0| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 20 6b |.break;.|..case k|
|000008b0| 51 75 69 74 49 74 65 6d | 3a 09 09 67 44 6f 6e 65 |QuitItem|:..gDone|
|000008c0| 20 3d 20 74 72 75 65 3b | 0d 09 09 09 09 09 09 09 | = true;|........|
|000008d0| 62 72 65 61 6b 3b 0d 09 | 7d 0d 7d 0d 0d 76 6f 69 |break;..|}.}..voi|
|000008e0| 64 20 48 61 6e 64 6c 65 | 72 46 6c 6f 61 74 65 72 |d Handle|rFloater|
|000008f0| 4d 65 6e 75 49 74 65 6d | 73 28 73 68 6f 72 74 20 |MenuItem|s(short |
|00000900| 74 68 65 49 74 65 6d 29 | 0d 7b 0d 09 42 6f 6f 6c |theItem)|.{..Bool|
|00000910| 65 61 6e 09 09 66 6c 6f | 61 74 65 72 56 69 73 69 |ean..flo|aterVisi|
|00000920| 62 6c 65 3b 0d 09 57 69 | 6e 64 6f 77 52 65 66 09 |ble;..Wi|ndowRef.|
|00000930| 66 6c 6f 61 74 65 72 50 | 69 63 6b 65 64 3b 0d 09 |floaterP|icked;..|
|00000940| 0d 09 73 77 69 74 63 68 | 20 28 74 68 65 49 74 65 |..switch| (theIte|
|00000950| 6d 29 20 7b 0d 09 09 63 | 61 73 65 20 6b 52 65 63 |m) {...c|ase kRec|
|00000960| 6f 72 64 69 6e 67 49 74 | 65 6d 3a 09 66 6c 6f 61 |ordingIt|em:.floa|
|00000970| 74 65 72 50 69 63 6b 65 | 64 20 3d 20 67 52 65 63 |terPicke|d = gRec|
|00000980| 6f 72 64 69 6e 67 46 6c | 6f 61 74 65 72 3b 0d 09 |ordingFl|oater;..|
|00000990| 09 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...|
|000009a0| 63 61 73 65 20 6b 54 6f | 6f 6c 73 49 74 65 6d 3a |case kTo|olsItem:|
|000009b0| 09 09 66 6c 6f 61 74 65 | 72 50 69 63 6b 65 64 20 |..floate|rPicked |
|000009c0| 3d 20 67 54 6f 6f 6c 73 | 46 6c 6f 61 74 65 72 3b |= gTools|Floater;|
|000009d0| 0d 09 09 09 09 09 09 09 | 09 62 72 65 61 6b 3b 0d |........|.break;.|
|000009e0| 09 7d 0d 09 0d 09 66 6c | 6f 61 74 65 72 56 69 73 |.}....fl|oaterVis|
|000009f0| 69 62 6c 65 20 3d 20 49 | 73 57 69 6e 64 6f 77 56 |ible = I|sWindowV|
|00000a00| 69 73 69 62 6c 65 28 66 | 6c 6f 61 74 65 72 50 69 |isible(f|loaterPi|
|00000a10| 63 6b 65 64 29 3b 0d 09 | 69 66 20 28 66 6c 6f 61 |cked);..|if (floa|
|00000a20| 74 65 72 56 69 73 69 62 | 6c 65 20 3d 3d 20 66 61 |terVisib|le == fa|
|00000a30| 6c 73 65 29 0d 09 09 53 | 68 6f 77 52 65 66 65 72 |lse)...S|howRefer|
|00000a40| 65 6e 63 65 64 57 69 6e | 64 6f 77 28 66 6c 6f 61 |encedWin|dow(floa|
|00000a50| 74 65 72 50 69 63 6b 65 | 64 29 3b 0d 09 65 6c 73 |terPicke|d);..els|
|00000a60| 65 0d 09 09 48 69 64 65 | 52 65 66 65 72 65 6e 63 |e...Hide|Referenc|
|00000a70| 65 64 57 69 6e 64 6f 77 | 28 66 6c 6f 61 74 65 72 |edWindow|(floater|
|00000a80| 50 69 63 6b 65 64 29 3b | 0d 09 43 68 65 63 6b 49 |Picked);|..CheckI|
|00000a90| 74 65 6d 28 47 65 74 4d | 48 61 6e 64 6c 65 28 72 |tem(GetM|Handle(r|
|00000aa0| 46 6c 6f 61 74 65 72 73 | 4d 65 6e 75 49 44 29 2c |Floaters|MenuID),|
|00000ab0| 20 74 68 65 49 74 65 6d | 2c 20 21 66 6c 6f 61 74 | theItem|, !float|
|00000ac0| 65 72 56 69 73 69 62 6c | 65 29 3b 0d 7d 0d 0d 76 |erVisibl|e);.}..v|
|00000ad0| 6f 69 64 20 43 72 65 61 | 74 65 4e 65 77 44 6f 63 |oid Crea|teNewDoc|
|00000ae0| 75 6d 65 6e 74 57 69 6e | 64 6f 77 28 29 0d 7b 0d |umentWin|dow().{.|
|00000af0| 09 57 69 6e 64 6f 77 52 | 65 66 09 6e 65 77 44 6f |.WindowR|ef.newDo|
|00000b00| 63 75 6d 65 6e 74 57 69 | 6e 64 6f 77 3b 0d 09 4f |cumentWi|ndow;..O|
|00000b10| 53 45 72 72 09 09 63 72 | 65 61 74 65 57 69 6e 64 |SErr..cr|eateWind|
|00000b20| 6f 77 45 72 72 6f 72 3b | 0d 09 0d 09 56 61 6c 69 |owError;|....Vali|
|00000b30| 64 61 74 65 57 69 6e 64 | 6f 77 4c 69 73 74 28 29 |dateWind|owList()|
|00000b40| 3b 0d 09 63 72 65 61 74 | 65 57 69 6e 64 6f 77 45 |;..creat|eWindowE|
|00000b50| 72 72 6f 72 20 3d 20 47 | 65 74 4e 65 77 57 69 6e |rror = G|etNewWin|
|00000b60| 64 6f 77 52 65 66 65 72 | 65 6e 63 65 28 26 6e 65 |dowRefer|ence(&ne|
|00000b70| 77 44 6f 63 75 6d 65 6e | 74 57 69 6e 64 6f 77 2c |wDocumen|tWindow,|
|00000b80| 20 31 32 38 2c 0d 09 09 | 09 09 09 09 09 09 09 09 | 128,...|........|
|00000b90| 09 09 28 57 69 6e 64 6f | 77 52 65 66 29 20 2d 31 |..(Windo|wRef) -1|
|00000ba0| 2c 20 67 41 63 74 69 76 | 61 74 65 45 76 65 6e 74 |, gActiv|ateEvent|
|00000bb0| 48 61 6e 64 6c 65 72 29 | 3b 0d 09 69 66 20 28 63 |Handler)|;..if (c|
|00000bc0| 72 65 61 74 65 57 69 6e | 64 6f 77 45 72 72 6f 72 |reateWin|dowError|
|00000bd0| 20 3d 3d 20 6e 6f 45 72 | 72 29 20 7b 0d 09 09 53 | == noEr|r) {...S|
|00000be0| 68 6f 77 52 65 66 65 72 | 65 6e 63 65 64 57 69 6e |howRefer|encedWin|
|00000bf0| 64 6f 77 28 6e 65 77 44 | 6f 63 75 6d 65 6e 74 57 |dow(newD|ocumentW|
|00000c00| 69 6e 64 6f 77 29 3b 0d | 09 09 45 6e 61 62 6c 65 |indow);.|..Enable|
|00000c10| 49 74 65 6d 28 47 65 74 | 4d 48 61 6e 64 6c 65 28 |Item(Get|MHandle(|
|00000c20| 72 46 69 6c 65 4d 65 6e | 75 49 44 29 2c 20 6b 43 |rFileMen|uID), kC|
|00000c30| 6c 6f 73 65 49 74 65 6d | 29 3b 0d 09 7d 0d 7d 0d |loseItem|);..}.}.|
|00000c40| 0d 76 6f 69 64 20 43 6c | 6f 73 65 46 69 72 73 74 |.void Cl|oseFirst|
|00000c50| 44 6f 63 75 6d 65 6e 74 | 57 69 6e 64 6f 77 28 29 |Document|Window()|
|00000c60| 0d 7b 0d 09 57 69 6e 64 | 6f 77 52 65 66 09 66 69 |.{..Wind|owRef.fi|
|00000c70| 72 73 74 44 6f 63 75 6d | 65 6e 74 57 69 6e 64 6f |rstDocum|entWindo|
|00000c80| 77 3b 0d 09 0d 09 56 61 | 6c 69 64 61 74 65 57 69 |w;....Va|lidateWi|
|00000c90| 6e 64 6f 77 4c 69 73 74 | 28 29 3b 0d 09 66 69 72 |ndowList|();..fir|
|00000ca0| 73 74 44 6f 63 75 6d 65 | 6e 74 57 69 6e 64 6f 77 |stDocume|ntWindow|
|00000cb0| 20 3d 20 46 72 6f 6e 74 | 4e 6f 6e 46 6c 6f 61 74 | = Front|NonFloat|
|00000cc0| 69 6e 67 57 69 6e 64 6f | 77 28 29 3b 0d 09 69 66 |ingWindo|w();..if|
|00000cd0| 20 28 66 69 72 73 74 44 | 6f 63 75 6d 65 6e 74 57 | (firstD|ocumentW|
|00000ce0| 69 6e 64 6f 77 20 21 3d | 20 6e 69 6c 29 0d 09 09 |indow !=| nil)...|
|00000cf0| 44 69 73 70 6f 73 65 57 | 69 6e 64 6f 77 52 65 66 |DisposeW|indowRef|
|00000d00| 65 72 65 6e 63 65 28 66 | 69 72 73 74 44 6f 63 75 |erence(f|irstDocu|
|00000d10| 6d 65 6e 74 57 69 6e 64 | 6f 77 29 3b 0d 09 69 66 |mentWind|ow);..if|
|00000d20| 20 28 46 72 6f 6e 74 4e | 6f 6e 46 6c 6f 61 74 69 | (FrontN|onFloati|
|00000d30| 6e 67 57 69 6e 64 6f 77 | 28 29 20 3d 3d 20 6e 69 |ngWindow|() == ni|
|00000d40| 6c 29 0d 09 09 44 69 73 | 61 62 6c 65 49 74 65 6d |l)...Dis|ableItem|
|00000d50| 28 47 65 74 4d 48 61 6e | 64 6c 65 28 72 46 69 6c |(GetMHan|dle(rFil|
|00000d60| 65 4d 65 6e 75 49 44 29 | 2c 20 6b 43 6c 6f 73 65 |eMenuID)|, kClose|
|00000d70| 49 74 65 6d 29 3b 0d 7d | 0d 0d 76 6f 69 64 20 53 |Item);.}|..void S|
|00000d80| 68 6f 77 46 69 6e 64 44 | 69 61 6c 6f 67 28 29 0d |howFindD|ialog().|
|00000d90| 7b 0d 09 44 69 61 6c 6f | 67 52 65 66 09 66 69 6e |{..Dialo|gRef.fin|
|00000da0| 64 44 69 61 6c 6f 67 3b | 0d 09 0d 09 44 65 61 63 |dDialog;|....Deac|
|00000db0| 74 69 76 61 74 65 46 6c | 6f 61 74 65 72 73 41 6e |tivateFl|oatersAn|
|00000dc0| 64 46 69 72 73 74 44 6f | 63 75 6d 65 6e 74 57 69 |dFirstDo|cumentWi|
|00000dd0| 6e 64 6f 77 28 29 3b 0d | 09 66 69 6e 64 44 69 61 |ndow();.|.findDia|
|00000de0| 6c 6f 67 20 3d 20 47 65 | 74 4e 65 77 44 69 61 6c |log = Ge|tNewDial|
|00000df0| 6f 67 28 32 35 37 2c 20 | 6e 69 6c 2c 20 20 28 57 |og(257, |nil, (W|
|00000e00| 69 6e 64 6f 77 52 65 66 | 29 2d 31 29 3b 0d 09 44 |indowRef|)-1);..D|
|00000e10| 69 73 61 62 6c 65 49 74 | 65 6d 28 47 65 74 4d 48 |isableIt|em(GetMH|
|00000e20| 61 6e 64 6c 65 28 72 41 | 70 70 6c 65 4d 65 6e 75 |andle(rA|ppleMenu|
|00000e30| 49 44 29 2c 20 30 29 3b | 0d 09 44 69 73 61 62 6c |ID), 0);|..Disabl|
|00000e40| 65 49 74 65 6d 28 47 65 | 74 4d 48 61 6e 64 6c 65 |eItem(Ge|tMHandle|
|00000e50| 28 72 46 69 6c 65 4d 65 | 6e 75 49 44 29 2c 20 30 |(rFileMe|nuID), 0|
|00000e60| 29 3b 0d 09 44 72 61 77 | 4d 65 6e 75 42 61 72 28 |);..Draw|MenuBar(|
|00000e70| 29 3b 0d 7d 0d 0d 76 6f | 69 64 20 44 69 73 70 6f |);.}..vo|id Dispo|
|00000e80| 73 65 46 69 6e 64 44 69 | 61 6c 6f 67 28 29 0d 7b |seFindDi|alog().{|
|00000e90| 0d 09 44 69 61 6c 6f 67 | 52 65 66 09 66 69 6e 64 |..Dialog|Ref.find|
|00000ea0| 44 69 61 6c 6f 67 3b 0d | 09 0d 09 66 69 6e 64 44 |Dialog;.|...findD|
|00000eb0| 69 61 6c 6f 67 20 3d 20 | 28 44 69 61 6c 6f 67 52 |ialog = |(DialogR|
|00000ec0| 65 66 29 46 72 6f 6e 74 | 57 69 6e 64 6f 77 28 29 |ef)Front|Window()|
|00000ed0| 3b 0d 09 44 69 73 70 6f | 73 65 44 69 61 6c 6f 67 |;..Dispo|seDialog|
|00000ee0| 28 66 69 6e 64 44 69 61 | 6c 6f 67 29 3b 0d 09 41 |(findDia|log);..A|
|00000ef0| 63 74 69 76 61 74 65 46 | 6c 6f 61 74 65 72 73 41 |ctivateF|loatersA|
|00000f00| 6e 64 46 69 72 73 74 44 | 6f 63 75 6d 65 6e 74 57 |ndFirstD|ocumentW|
|00000f10| 69 6e 64 6f 77 28 29 3b | 0d 09 45 6e 61 62 6c 65 |indow();|..Enable|
|00000f20| 49 74 65 6d 28 47 65 74 | 4d 48 61 6e 64 6c 65 28 |Item(Get|MHandle(|
|00000f30| 72 41 70 70 6c 65 4d 65 | 6e 75 49 44 29 2c 20 30 |rAppleMe|nuID), 0|
|00000f40| 29 3b 0d 09 45 6e 61 62 | 6c 65 49 74 65 6d 28 47 |);..Enab|leItem(G|
|00000f50| 65 74 4d 48 61 6e 64 6c | 65 28 72 46 69 6c 65 4d |etMHandl|e(rFileM|
|00000f60| 65 6e 75 49 44 29 2c 20 | 30 29 3b 0d 09 44 72 61 |enuID), |0);..Dra|
|00000f70| 77 4d 65 6e 75 42 61 72 | 28 29 3b 0d 7d 0d 0d 76 |wMenuBar|();.}..v|
|00000f80| 6f 69 64 20 54 65 73 74 | 4d 61 6e 75 61 6c 4d 6f |oid Test|ManualMo|
|00000f90| 64 61 6c 28 76 6f 69 64 | 29 0d 7b 0d 09 52 65 63 |dal(void|).{..Rec|
|00000fa0| 74 09 09 74 68 65 52 65 | 63 74 3b 0d 09 4f 53 45 |t..theRe|ct;..OSE|
|00000fb0| 72 72 09 09 65 72 72 6f | 72 3b 0d 09 57 69 6e 64 |rr..erro|r;..Wind|
|00000fc0| 6f 77 41 74 74 72 69 62 | 75 74 65 73 09 61 74 74 |owAttrib|utes.att|
|00000fd0| 72 69 62 75 74 65 73 3b | 0d 09 57 69 6e 64 6f 77 |ributes;|..Window|
|00000fe0| 52 65 66 09 77 69 6e 64 | 3b 0d 09 43 6f 6e 74 72 |Ref.wind|;..Contr|
|00000ff0| 6f 6c 48 61 6e 64 6c 65 | 09 63 48 61 6e 64 6c 65 |olHandle|.cHandle|
|00001000| 3b 0d 0d 09 2f 2f 20 50 | 75 74 20 75 70 20 61 20 |;...// P|ut up a |
|00001010| 6d 6f 76 61 62 6c 65 20 | 6d 6f 64 61 6c 0d 09 61 |movable |modal..a|
|00001020| 74 74 72 69 62 75 74 65 | 73 20 3d 20 6b 48 61 73 |ttribute|s = kHas|
|00001030| 4d 6f 64 61 6c 42 6f 72 | 64 65 72 4d 61 73 6b 20 |ModalBor|derMask |
|00001040| 2b 20 6b 48 61 73 44 6f | 63 75 6d 65 6e 74 54 69 |+ kHasDo|cumentTi|
|00001050| 74 6c 65 62 61 72 4d 61 | 73 6b 3b 0d 09 53 65 74 |tlebarMa|sk;..Set|
|00001060| 52 65 63 74 28 26 74 68 | 65 52 65 63 74 2c 20 32 |Rect(&th|eRect, 2|
|00001070| 30 30 2c 20 31 30 30 2c | 20 34 30 30 2c 20 32 35 |00, 100,| 400, 25|
|00001080| 30 29 3b 0d 09 0d 09 2f | 2f 20 63 72 65 61 74 65 |0);..../|/ create|
|00001090| 20 74 68 65 20 77 69 6e | 64 6f 77 20 69 6e 76 69 | the win|dow invi|
|000010a0| 73 69 62 6c 79 0d 09 65 | 72 72 6f 72 20 3d 20 4e |sibly..e|rror = N|
|000010b0| 65 77 57 69 6e 64 6f 77 | 52 65 66 65 72 65 6e 63 |ewWindow|Referenc|
|000010c0| 65 28 26 77 69 6e 64 2c | 20 26 74 68 65 52 65 63 |e(&wind,| &theRec|
|000010d0| 74 2c 20 22 5c 70 54 65 | 73 74 79 20 4d 61 6d 62 |t, "\pTe|sty Mamb|
|000010e0| 6f 22 2c 20 66 61 6c 73 | 65 2c 0d 09 09 09 09 09 |o", fals|e,......|
|000010f0| 61 74 74 72 69 62 75 74 | 65 73 2c 20 28 57 69 6e |attribut|es, (Win|
|00001100| 64 6f 77 52 65 66 29 20 | 2d 31 2c 20 28 6c 6f 6e |dowRef) |-1, (lon|
|00001110| 67 29 27 44 41 56 45 27 | 2c 20 6e 69 6c 29 3b 0d |g)'DAVE'|, nil);.|
|00001120| 09 0d 09 69 66 28 77 69 | 6e 64 20 3d 3d 20 6e 69 |...if(wi|nd == ni|
|00001130| 6c 29 0d 09 09 72 65 74 | 75 72 6e 3b 0d 09 09 0d |l)...ret|urn;....|
|00001140| 09 2f 2f 20 53 65 74 20 | 69 74 73 20 6b 69 6e 64 |.// Set |its kind|
|00001150| 0d 09 2f 2f 53 65 74 57 | 69 6e 64 6f 77 4b 69 6e |..//SetW|indowKin|
|00001160| 64 28 77 69 6e 64 2c 20 | 64 69 61 6c 6f 67 4b 69 |d(wind, |dialogKi|
|00001170| 6e 64 29 3b 0d 09 0d 09 | 2f 2f 20 41 64 64 20 61 |nd);....|// Add a|
|00001180| 20 62 75 74 74 6f 6e 0d | 09 53 65 74 52 65 63 74 | button.|.SetRect|
|00001190| 28 26 74 68 65 52 65 63 | 74 2c 20 32 30 2c 20 32 |(&theRec|t, 20, 2|
|000011a0| 30 2c 20 38 30 2c 20 34 | 30 29 3b 0d 09 63 48 61 |0, 80, 4|0);..cHa|
|000011b0| 6e 64 6c 65 20 3d 20 4e | 65 77 43 6f 6e 74 72 6f |ndle = N|ewContro|
|000011c0| 6c 28 77 69 6e 64 2c 20 | 26 74 68 65 52 65 63 74 |l(wind, |&theRect|
|000011d0| 2c 20 22 5c 70 50 72 65 | 73 73 22 2c 20 74 72 75 |, "\pPre|ss", tru|
|000011e0| 65 2c 20 30 2c 20 30 2c | 20 31 2c 20 30 2c 20 27 |e, 0, 0,| 1, 0, '|
|000011f0| 44 41 56 45 27 29 3b 0d | 09 0d 09 2f 2f 20 53 68 |DAVE');.|...// Sh|
|00001200| 6f 77 20 77 69 6e 64 6f | 77 0d 09 44 65 61 63 74 |ow windo|w..Deact|
|00001210| 69 76 61 74 65 46 6c 6f | 61 74 65 72 73 41 6e 64 |ivateFlo|atersAnd|
|00001220| 46 69 72 73 74 44 6f 63 | 75 6d 65 6e 74 57 69 6e |FirstDoc|umentWin|
|00001230| 64 6f 77 28 29 3b 0d 09 | 53 68 6f 77 52 65 66 65 |dow();..|ShowRefe|
|00001240| 72 65 6e 63 65 64 57 69 | 6e 64 6f 77 28 77 69 6e |rencedWi|ndow(win|
|00001250| 64 29 3b 0d 7d 0d 0d 0d | 0d 0d 0d 0d 0d 0d 0d 0d |d);.}...|........|
|00001260| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001280| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00001290| 2a 2f 0d 23 64 65 66 69 | 6e 65 09 6b 4e 6f 50 50 |*/.#defi|ne.kNoPP|
|000012a0| 43 54 6f 6f 6c 62 6f 78 | 09 09 09 34 09 09 09 09 |CToolbox|...4....|
|000012b0| 0e 6d 65 6e 75 44 69 73 | 70 61 74 63 68 2e 63 6d |.menuDis|patch.cm|
|000012c0| 02 00 00 00 54 45 58 54 | 4d 4d 43 43 01 00 ff ff |....TEXT|MMCC....|
|000012d0| 00 00 54 45 58 54 4d 4d | 43 43 01 00 ff ff ff ff |..TEXTMM|CC......|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 a3 8c 8d f6 00 00 | 11 e1 00 00 01 c8 09 09 |........|........|
|00001300| 09 2f 2a 20 53 65 74 20 | 74 6f 20 74 72 75 65 20 |./* Set |to true |
|00001310| 69 66 20 75 73 65 72 20 | 73 65 6c 65 63 74 73 20 |if user |selects |
|00001320| 51 75 69 74 20 2a 2f 0d | 42 6f 6f 6c 65 61 6e 20 |Quit */.|Boolean |
|00001330| 67 49 6e 42 61 63 6b 67 | 72 6f 75 6e 64 3b 09 09 |gInBackg|round;..|
|00001340| 09 09 09 2f 2a 20 53 65 | 74 20 74 6f 20 74 72 75 |.../* Se|t to tru|
|00001350| 65 20 69 66 20 61 70 70 | 20 69 73 20 73 77 69 74 |e if app| is swit|
|00001360| 63 68 65 64 20 69 6e 74 | 6f 20 62 61 63 6b 67 72 |ched int|o backgr|
|00001370| 6f 75 6e 64 20 2a 2f 0d | 52 65 63 74 09 67 44 72 |ound */.|Rect.gDr|
|00001380| 00 00 00 1e 00 50 00 20 | 01 dd 02 3d 00 50 00 20 |.....P. |...=.P. |
|00001390| 01 dd 02 3d 00 00 00 00 | 00 00 00 00 00 00 00 00 |...=....|........|
|000013a0| 00 00 00 00 00 48 00 0a | 43 6f 75 72 69 65 72 00 |.....H..|Courier.|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 5e 00 0f |........|.....^..|
|000013d0| 01 e9 02 82 00 5e 00 0f | 01 e9 02 82 ac 31 46 b0 |.....^..|.....1F.|
|000013e0| 00 00 0f db 00 00 0f db | 00 00 0e ff 01 00 00 00 |........|........|
|000013f0| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00001400| 00 76 00 00 00 52 01 31 | 73 4c 27 aa 00 00 00 1c |.v...R.1|sL'.....|
|00001410| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00001420| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|00001430| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|00001440| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|00001450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+